package xin.ryven.workflow.repository;

import xin.ryven.workflow.model.ProcessDefinitions;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
import java.util.Optional;

public interface ProcessDefinitionRepository extends JpaRepository<ProcessDefinitions, Long> {
    Optional<ProcessDefinitions> findByKeyAndVersion(String key, String version);
    List<ProcessDefinitions> findByKeyOrderByVersionDesc(String key);
    List<ProcessDefinitions> findByIsLatestTrue();
} 